package com.ronan.imweb.rpc;

import com.ronan.common.pojo.SendMsgReq;
import com.ronan.common.pojo.SendMsgVo;
import com.ronan.common.response.Result;
import com.ronan.imweb.rpc.fallback.IMServerRpcServiceFallBackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * FileName    : com.ronan.imweb.service
 * Description :
 *
 * @author : ronan
 * @version : 1.0
 * Create Date : 2021/2/27 14:44
 **/
@Component
@FeignClient(value = "mirage-im-server", fallback = IMServerRpcServiceFallBackImpl.class)
public interface IMServerRpcService {


    /**
     * 推送消息
     *
     * @param req 消息
     * @return {@link Result<Boolean>}
     */
    @PostMapping(value = "/im/server/message/v1SendMsg")
    Result<SendMsgVo> v1SendMsg(@RequestBody SendMsgReq req);

}
